﻿#if USE_UNI_LUA
using LuaAPI = UniLua.Lua;
using RealStatePtr = UniLua.ILuaState;
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
#else
using LuaAPI = XLua.LuaDLL.Lua;
using RealStatePtr = System.IntPtr;
using LuaCSFunction = XLuaBase.lua_CSFunction;
#endif

using XLua;
using System.Collections.Generic;


namespace XLua.CSObjectWrap
{
    using Utils = XLua.Utils;
    public class WorldMapBaseTilePoolWorldPoolManagerWrap 
    {
        public static void __Register(RealStatePtr L)
        {
			ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			System.Type type = typeof(WorldMapBase.Tile.Pool.WorldPoolManager);
			Utils.BeginObjectRegister(type, L, translator, 0, 2, 0, 0);
			
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnInit", _m_OnInit);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "Dispose", _m_Dispose);
			
			
			
			
			
			Utils.EndObjectRegister(type, L, translator, null, null,
			    null, null, null);

		    Utils.BeginClassRegister(type, L, __CreateInstance, 15, 3, 3);
			Utils.RegisterFunc(L, Utils.CLS_IDX, "GetTreeRoot", _m_GetTreeRoot_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "GetTerrainRoot", _m_GetTerrainRoot_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "GetInstanceRoot", _m_GetInstanceRoot_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "Init", _m_Init_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "PreloadAssets", _m_PreloadAssets_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "AddOnePool", _m_AddOnePool_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "InitOnePool", _m_InitOnePool_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "GetWorldObject", _m_GetWorldObject_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "RecoverItem", _m_RecoverItem_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "DestroyPool", _m_DestroyPool_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "UpdateMat", _m_UpdateMat_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "RegisterLoadCallBack", _m_RegisterLoadCallBack_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "LoadResCallBack", _m_LoadResCallBack_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "UnregisterLoadCallBack", _m_UnregisterLoadCallBack_xlua_st_);
            
			
            
			Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "InstanceRoot", _g_get_InstanceRoot);
            Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "TreeRoot", _g_get_TreeRoot);
            Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "TerrainRoot", _g_get_TerrainRoot);
            
			Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "InstanceRoot", _s_set_InstanceRoot);
            Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "TreeRoot", _s_set_TreeRoot);
            Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "TerrainRoot", _s_set_TerrainRoot);
            
			
            Utils.RegisterFunc(L, Utils.CLS_IDX, "New", __CreateInstanceNew);
			Utils.EndClassRegister(type, L, translator);
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __CreateInstance(RealStatePtr L)
        {
            
			try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
				if(LuaAPI.lua_gettop(L) == 1)
				{
					
					var gen_ret = new WorldMapBase.Tile.Pool.WorldPoolManager();
					translator.Push(L, gen_ret);
                    
					return 1;
				}
				
			}
			catch(System.Exception gen_e) {
				return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
			}
            return LuaAPI.luaL_error(L, "invalid arguments to WorldMapBase.Tile.Pool.WorldPoolManager constructor!");
            
        }

        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __CreateInstanceNew(RealStatePtr L)
        {
            
			try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
				if(LuaAPI.lua_gettop(L) == 0)
				{
					
					var gen_ret = new WorldMapBase.Tile.Pool.WorldPoolManager();
					translator.Push(L, gen_ret);
                    
					return 1;
				}
				
			}
			catch(System.Exception gen_e) {
				return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
			}
            return LuaAPI.luaL_error(L, "invalid arguments to WorldMapBase.Tile.Pool.WorldPoolManager constructor!");
            
        }

        
		
        
		
        
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_GetTreeRoot_xlua_st_(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
                
                {
                    
                        var gen_ret = WorldMapBase.Tile.Pool.WorldPoolManager.GetTreeRoot(  );
                        translator.Push(L, gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_GetTerrainRoot_xlua_st_(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
                
                {
                    
                        var gen_ret = WorldMapBase.Tile.Pool.WorldPoolManager.GetTerrainRoot(  );
                        translator.Push(L, gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_GetInstanceRoot_xlua_st_(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
                
                {
                    
                        var gen_ret = WorldMapBase.Tile.Pool.WorldPoolManager.GetInstanceRoot(  );
                        translator.Push(L, gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_Init_xlua_st_(RealStatePtr L)
        {
		    try {
            
            
            
                
                {
                    
                    WorldMapBase.Tile.Pool.WorldPoolManager.Init(  );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_PreloadAssets_xlua_st_(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
                
                {
                    XLua.LuaFunction _onComplete = (XLua.LuaFunction)translator.GetObject(L, 1, typeof(XLua.LuaFunction));
                    
                    WorldMapBase.Tile.Pool.WorldPoolManager.PreloadAssets( _onComplete );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_OnInit(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                WorldMapBase.Tile.Pool.WorldPoolManager gen_to_be_invoked = (WorldMapBase.Tile.Pool.WorldPoolManager)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    
                    gen_to_be_invoked.OnInit(  );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_AddOnePool_xlua_st_(RealStatePtr L)
        {
		    try {
            
            
            
                
                {
                    int _resID = LuaAPI.xlua_tointeger(L, 1);
                    
                    WorldMapBase.Tile.Pool.WorldPoolManager.AddOnePool( _resID );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_InitOnePool_xlua_st_(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
                
                {
                    int _resID = LuaAPI.xlua_tointeger(L, 1);
                    UnityEngine.GameObject _obj = (UnityEngine.GameObject)translator.GetObject(L, 2, typeof(UnityEngine.GameObject));
                    
                    WorldMapBase.Tile.Pool.WorldPoolManager.InitOnePool( _resID, _obj );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_GetWorldObject_xlua_st_(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
                
                {
                    int _lodIndex = LuaAPI.xlua_tointeger(L, 1);
                    int _mapLayer = LuaAPI.xlua_tointeger(L, 2);
                    int _resID = LuaAPI.xlua_tointeger(L, 3);
                    
                        var gen_ret = WorldMapBase.Tile.Pool.WorldPoolManager.GetWorldObject( _lodIndex, _mapLayer, _resID );
                        translator.Push(L, gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_RecoverItem_xlua_st_(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
                
                {
                    WorldMapBase.Tile.WorldObject _worldObject = (WorldMapBase.Tile.WorldObject)translator.GetObject(L, 1, typeof(WorldMapBase.Tile.WorldObject));
                    
                    WorldMapBase.Tile.Pool.WorldPoolManager.RecoverItem( _worldObject );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_DestroyPool_xlua_st_(RealStatePtr L)
        {
		    try {
            
            
            
                
                {
                    
                    WorldMapBase.Tile.Pool.WorldPoolManager.DestroyPool(  );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_Dispose(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                WorldMapBase.Tile.Pool.WorldPoolManager gen_to_be_invoked = (WorldMapBase.Tile.Pool.WorldPoolManager)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    
                    gen_to_be_invoked.Dispose(  );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_UpdateMat_xlua_st_(RealStatePtr L)
        {
		    try {
            
            
            
                
                {
                    int _lodLayer = LuaAPI.xlua_tointeger(L, 1);
                    
                    WorldMapBase.Tile.Pool.WorldPoolManager.UpdateMat( _lodLayer );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_RegisterLoadCallBack_xlua_st_(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
                
                {
                    int _resId = LuaAPI.xlua_tointeger(L, 1);
                    WorldMapBase.Tile.CommandTileElement _element = (WorldMapBase.Tile.CommandTileElement)translator.GetObject(L, 2, typeof(WorldMapBase.Tile.CommandTileElement));
                    
                    WorldMapBase.Tile.Pool.WorldPoolManager.RegisterLoadCallBack( _resId, _element );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_LoadResCallBack_xlua_st_(RealStatePtr L)
        {
		    try {
            
            
            
                
                {
                    int _resId = LuaAPI.xlua_tointeger(L, 1);
                    
                    WorldMapBase.Tile.Pool.WorldPoolManager.LoadResCallBack( _resId );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_UnregisterLoadCallBack_xlua_st_(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
                
                {
                    int _resId = LuaAPI.xlua_tointeger(L, 1);
                    WorldMapBase.Tile.CommandTileElement _element = (WorldMapBase.Tile.CommandTileElement)translator.GetObject(L, 2, typeof(WorldMapBase.Tile.CommandTileElement));
                    
                    WorldMapBase.Tile.Pool.WorldPoolManager.UnregisterLoadCallBack( _resId, _element );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_InstanceRoot(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			    translator.Push(L, WorldMapBase.Tile.Pool.WorldPoolManager.InstanceRoot);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_TreeRoot(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			    translator.Push(L, WorldMapBase.Tile.Pool.WorldPoolManager.TreeRoot);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_TerrainRoot(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			    translator.Push(L, WorldMapBase.Tile.Pool.WorldPoolManager.TerrainRoot);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_InstanceRoot(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			    WorldMapBase.Tile.Pool.WorldPoolManager.InstanceRoot = (UnityEngine.Transform)translator.GetObject(L, 1, typeof(UnityEngine.Transform));
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_TreeRoot(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			    WorldMapBase.Tile.Pool.WorldPoolManager.TreeRoot = (UnityEngine.Transform)translator.GetObject(L, 1, typeof(UnityEngine.Transform));
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_TerrainRoot(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			    WorldMapBase.Tile.Pool.WorldPoolManager.TerrainRoot = (UnityEngine.Transform)translator.GetObject(L, 1, typeof(UnityEngine.Transform));
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
		
		
		
		
    }
}
